[IA64] Stop all cpus at panic
authorAlex Williamson <alex.williamson@hp.com>
Tue, 11 Dec 2007 17:22:37 +0000 (10:22 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Tue, 11 Dec 2007 17:22:37 +0000 (10:22 -0700)
Current panic() of hypervisor doesn't stop all cpus.
So domains can work after hypervisor panic (when using
noreboot option).  If dom0 continues to work after
xen panic, the system may get into serious problems.

This patch fixes the issue.

I chose cpu_halt() to stop other cpus by smp_send_stop().
I think it should work fine for kexec.  machine_halt()
is only spinloop for leaving the panic calltrace.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
xen/arch/ia64/linux-xen/smp.c
xen/arch/ia64/xen/domain.c

index f9ae4f27812a25a611a9419063aae2e30cdc70ae..5ebe45cf3836fe30f430a04a930ba449993db607 100644 (file)
@@ -122,9 +122,7 @@ stop_this_cpu (void)
        cpu_clear(smp_processor_id(), cpu_online_map);
        max_xtp();
        local_irq_disable();
-#ifndef XEN
        cpu_halt();
-#endif
 }
 
 void
@@ -132,9 +130,7 @@ cpu_die(void)
 {
        max_xtp();
        local_irq_disable();
-#ifndef XEN
        cpu_halt();
-#endif
        /* Should never be here */
        BUG();
        for (;;);
index 1cb19453c4ae0ad911bec110aae73fdd3c8f870a..577721d76c5455cdf1af0ad9e081cb9720f4c4a5 100644 (file)
@@ -2207,10 +2207,12 @@ extern void cpu_halt(void);
 void machine_halt(void)
 {
        console_start_sync();
-       if (running_on_sim)
-               printk ("machine_halt called.  spinning...\n");
-       else
-               cpu_halt();
+
+#ifdef CONFIG_SMP
+       smp_send_stop();
+#endif
+
+       printk ("machine_halt called.  spinning...\n");
        while(1);
 }